CREATE TABLE jms_dim.dim_network_abnormal_type_union_dt
(
     input_date        date        comment '查询日期',
    network_code   varchar(20) comment '网点编码',
    network_name varchar(100) comment '网点名称',
    regional_id int comment '大区ID',
    regional_desc varchar(100) COMMENT '大区名称',
   area_info_id int COMMENT '片区ID',
   area_info_desc varchar(100) COMMENT '片区名称',
   provider_id int COMMENT '省份ID',
   provider_desc varchar(100) COMMENT '省份',
   city_id int COMMENT '城市ID',
   city_desc varchar(100) COMMENT '城市',
   area_id int COMMENT '区/县ID',
   area_desc varchar(100) COMMENT '区/县',
   is_shaidan int comment '是否筛单网点(0:否;1:是)',
   is_delay int comment '是否顺延网点(0:否;1:是)',
   is_new_open int comment '是否新开网点(0:否;1:是)',
   is_special_report int comment '是否特殊异常网点(0:否;1:是)',
   create_time datetime comment '数据落地时间'
) ENGINE = OLAP
DUPLICATE KEY(input_date,network_code)
COMMENT '异常报备网点类型'
PARTITION BY RANGE(input_date)
(START ('2023-05-01') END ('2023-06-20') EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(network_code) BUCKETS 5
PROPERTIES (
'replication_num' = '3',
'dynamic_partition.enable' = 'true',
'dynamic_partition.time_unit' = 'DAY',
'dynamic_partition.time_zone' = 'Asia/Shanghai',
'dynamic_partition.start' = '-180',
'dynamic_partition.end' = '3',
'dynamic_partition.prefix' = 'p',
'dynamic_partition.buckets' = '5',
'in_memory' = 'false',
'storage_format' = 'V2'
);